<?php

$userid = get_input('user_id');
$code = get_input('code');
//echo ' raw = ' . get_input('code') . ' --- ';
//echo ' code = ' . $code . '   ---   ';

if(greengar_confirm_reset_password($userid, $code)) {
    $status = 'Thank you!';
    $message = 'Your password has been reset, please check email for new password.';
} else {
    $status = 'ERROR';
    $message = 'Your request has been expired or is invalid';
}

$status = urlencode($status);
$message = urlencode($message);
forward("web/confirmation/index.php?status=$status&message=$message");

?>
